package week6;

import java.util.Scanner;

public class StringStudy {public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    System.out.println("输入字符串");
    String string = scanner.next();
    int len = string.length();
    System.out.println("len = " + len);
    int Blettere = 0, Sletter = 0,digit = 0;
    for (int i = 0; i < len; i++) {
        char ch = string.charAt(i);
        if (ch >= 65 && ch <= 90) Blettere++;
        else if (ch >= 97 && ch <= 122) Sletter++;
        else if (ch >= 48 && ch <= 57) digit++;

    }
    System.out.println("小写字母个数"+ Sletter );
    System.out.println("大写字母个数" + Blettere);
    System.out.println("数字个数" + digit);
}
}
